[IA64] boot windows server 2003:emulate stf.spill instruction
authorawilliam@xenbuild.aw <awilliam@xenbuild.aw>
Mon, 31 Jul 2006 16:14:31 +0000 (10:14 -0600)
committerawilliam@xenbuild.aw <awilliam@xenbuild.aw>
Mon, 31 Jul 2006 16:14:31 +0000 (10:14 -0600)
Windows use stf.spill [r3]=f2 to access mmio address space

Signed-off-by: Anthony Xu <anthony.xu@intel.com>
xen/arch/ia64/vmx/mmio.c

index 8890f5052397b969caa1af4f5d70616c49fadc4b..1e4f3402b0af8541b57b414c83f9c6a528e3940b 100644 (file)
@@ -495,6 +495,21 @@ void emulate_io_inst(VCPU *vcpu, u64 padr, u64 ma)
 
         }
     }
+    // Floating-point spill
+    else if (inst.M9.major == 6 && inst.M9.x6 == 0x3B &&
+             inst.M9.m == 0 && inst.M9.x == 0) {
+        struct ia64_fpreg v;
+
+        inst_type = SL_FLOATING;
+        dir = IOREQ_WRITE;
+        vcpu_get_fpreg(vcpu, inst.M9.f2, &v);
+        /* Write high word.
+           FIXME: this is a kludge!  */
+        v.u.bits[1] &= 0x3ffff;
+        mmio_access(vcpu, padr + 8, &v.u.bits[1], 8, ma, IOREQ_WRITE);
+        data = v.u.bits[0];
+        size = 3;
+    }
     // Floating-point spill + Imm update
     else if(inst.M10.major==7&&inst.M10.x6==0x3B){
         struct ia64_fpreg v;